//
//  LGDeviceInventoryNumberCell.m
//  HeartDiseaseManage
//
//  Created by 1234 on 2025/3/5.
//

#import "LGDeviceInventoryNumberCell.h"

@interface LGDeviceInventoryNumberCell()

/**   */
@property (nonatomic , strong)UILabel *titleLabel;
/**   */
@property (nonatomic , strong)UILabel *numberLabel;

@end

@implementation LGDeviceInventoryNumberCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.type = LGPositionTypeMiddle;
        [self.contentView addSubview:self.titleLabel];
        [self.contentView addSubview:self.numberLabel];
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.contentView).offset(viewPix(6));
            make.left.equalTo(self.contentView).offset(viewPix(28));
            make.bottom.equalTo(self.contentView).offset(-viewPix(6));
            make.right.lessThanOrEqualTo(self.contentView).offset(-viewPix(80));
        }];
        [self.numberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.titleLabel.mas_right).offset(viewPix(12));
            make.centerY.equalTo(self.titleLabel);
        }];
    }
    return  self;
}

-(void)setDataDic:(NSDictionary *)dataDic{
    [super setDataDic:dataDic];
    self.titleLabel.text = LGNSString(dataDic[@"title"]);
    self.numberLabel.text = LGNSString(dataDic[@"number"]);
}

-(UILabel *)titleLabel{
    if(!_titleLabel){
        _titleLabel = [UILabel lableWithText:@"" colorString:@"#606266" textFont:LGFont(16) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _titleLabel;
}

-(UILabel *)numberLabel{
    if(!_numberLabel){
        _numberLabel = [UILabel lableWithText:@"" colorString:@"#4C87FD" textFont:LGFontWeight(16, UIFontWeightMedium) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _numberLabel;
}

@end
